package com.zhuiyun.project.api.collectVideo.mapper;

import com.zhuiyun.project.api.collectVideo.entity.CollectVideo;
import org.apache.ibatis.annotations.Mapper;
import com.zhuiyun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CollectVideoMapper
 * @Description TODO 视频收藏接口
 * @Author LXJ
 * @Date 2023/12/11 14:55
 **/
@Mapper
public interface CollectVideoMapper extends BaseMapper<CollectVideo>{
    /**
     * @Author LXJ
     * @Description 根据用户id查询倒序收藏列表
     * @Date 2023/12/12 8:28
     * @Return
     * @param userId
     */
    List<CollectVideo> getCollectVideoById(@Param("userId") Integer userId,@Param("videoTopic") String videoTopic,@Param("videoDesc") String videoDesc ,@Param("Favorites") Integer Favorites);

    /**
     * @Author LXJ
     * @Description 根据用户id查询正序收藏列表
     * @Date 2023/12/12 8:28
     * @Return
     * @param userId
     */
    List<CollectVideo> getCollectVideoByIdASC(@Param("userId") Integer userId,@Param("videoTopic") String videoTopic,@Param("videoDesc") String videoDesc,@Param("Favorites") Integer Favorites);

    /**
    * @Author XC8
    * @Description 收藏
    * @Date 2024/3/8 9:34
    * @Return int
    */
    int addCollectVideo(CollectVideo collectVideo);

    /**
    * @Author XC8
    * @Description 取消收藏
    * @Date 2024/3/8 9:35
    * @Return int
    */
    int collectVideoDelete(CollectVideo collectVideo);
}
